package cmd

import (
	"fmt"
	"os"
)

func getCommandIndex() int {
	index := -1
	for i, v := range os.Args[2:] {
		if v == "--" {
			index = i
			break
		}
	}
	return index
}

func EnvRun() {
	fmt.Println("EnvRun")
	if len(os.Args) < 3 {
		fmt.Println("[PackageName-Version] [--] [Run Command]")
	}
	separate_index := getCommandIndex()
	if separate_index == -1 {
		fmt.Println("[PackageName-Version] [--] [Run Command]")
	} else {
		run_command := os.Args[2:][separate_index+1:]
		fmt.Printf("Run Command: %v\n", run_command)
	}
}
